using MicroMsg.Manager;
using MicroMsg.Protocol;
using Microsoft.Phone.Info;
using System;
using System.Collections.Generic;
namespace MicroMsg.Common.Utils
{
	public class AppInfoHelper
	{
		private const string TAG = "AppInfoHelper";
		private static Dictionary<string, string> mapProperties;
		private static long sNDeviceTotalMem;
		public static string Version
		{
			get
			{
				return VersionHelper.Version;
			}
		}
		public static string ProductId
		{
			get
			{
				return VersionHelper.ProductId;
			}
		}
		public static string Genre
		{
			get
			{
				return VersionHelper.Genre;
			}
		}
		public static string Description
		{
			get
			{
				return VersionHelper.Description;
			}
		}
		public static string Publisher
		{
			get
			{
				return VersionHelper.Publisher;
			}
		}
		public static int ChannelId
		{
			get
			{
				return VersionHelper.ChannelId;
			}
		}
		public static void printfInfo()
		{
			Log.smethod_4("AppInfoHelper", string.Concat(new string[]
			{
				"Memory: total = ",
				Util.dotFormat((uint)DeviceStatus.get_DeviceTotalMemory()),
				", current = ",
				Util.dotFormat((uint)DeviceStatus.get_ApplicationCurrentMemoryUsage()),
				", limit = ",
				Util.dotFormat((uint)DeviceStatus.get_ApplicationMemoryUsageLimit()),
				", peak = ",
				Util.dotFormat((uint)DeviceStatus.get_ApplicationPeakMemoryUsage())
			}));
			Log.smethod_4("AppInfoHelper", AccountMgr.mConstAccountInfo);
			Log.smethod_4("AppInfoHelper", AccountMgr.mConstDeviceInfo);
			Log.smethod_4("AppInfoHelper", string.Concat(new object[]
			{
				"Version = ",
				AppInfoHelper.Version,
				",ProductId = ",
				AppInfoHelper.ProductId,
				",ChannelId = ",
				AppInfoHelper.ChannelId,
				",Description = ",
				AppInfoHelper.Description,
				",LBS",
				ConstantsProtocol.LBS_INFO
			}));
			Log.smethod_4("AppInfoHelper", "BuildTime=" + AppCompileDate.CreateDate);
		}
		public static bool Is256MbDevice()
		{
			if (0L == AppInfoHelper.sNDeviceTotalMem)
			{
				AppInfoHelper.sNDeviceTotalMem = DeviceStatus.get_DeviceTotalMemory() / 1024L / 1024L;
			}
			return AppInfoHelper.sNDeviceTotalMem <= 256L;
		}
	}
}
